Replication File for Vaccine Diplomacy: How COVID-19 Vaccine Distribution in Latin America Increases Trust in Foreign Governments (Elena Barham, Sarah Zukerman Daly, Julian E. Gerez, John Marshall, and Oscar Pocasangre), World Politics 2023

SOFTWARE

R code was run in version 4.2.0 for Mac, and requires the following packages installed: groundhog, car, cowplot, geomtextpath, estimatr, haven, Hmisc, lmtest, MASS, modelsummary, tidyverse, ggplot2, sandwich, scales, vtable, xtable. Our code assumes these packages are already installed. The groundhog package will revert the other packages to the version on the date we executed the analysis, April 23, 2022.

INGESTED DATA

The following data files are included:

1. Wide version of survey data, where each row corresponds to a respondent:

- vaccine_diplomacy_wide.csv
- vaccine_diplomacy_wide.dta

2. Long version of survey data, where each row corresponds to a respondent-developer country:

- vaccine_diplomacy_long.csv
- vaccine_diplomacy_long.dta

These first two files are original data of the authors, and are the primary files used in the analysis.

The following ancillary files are used to build descriptive figures and tables:

3. raw vaccination data.csv represents cumulative doses per 100 people across the six Latin American countries of our study from January 2021 to July 2021. Used to create Figure 1.

4. doses_received.csv reports the of vaccine doses per adult from each vaccine-developer country in May 2021. Used to create Figure 3.

5. heatmap_data.csv shows perceived and actual ranking of doses delivered by each vaccine developer country in each country surveyed. Used to create Figure 5.

6. baseline_vaccine_wide.dta is the dataset used in our baseline survey, and is used to create summary statistics for Table A1.

All of these files must be placed in working directory prior to running code. Please also note that in saving tables and figures, the code assumes folders titled Tables and Figures to be in the working directory.

CODE

0. run_all.R: this file loads all necessary packages and sources the other code files to run the entire analysis at once.

If you would like to replicate individual tables or figures, you can do so by using the separate files that are sourced in this main file. All files are tagged to clearly delineate each figure or table.

Please note that recreating any of the tables will require you to source the table_function function, which can be found in the files table_function.R or (where relevant) LDV_table_function.R, which were used to facilitate the construction of the tables. To recreate the standard errors for the ordered logit models, you must run the ordered_logit.do file in Stata.

1. figures.R: replicates the figures in the main paper and appendix. 

2. tables_observational.R: generates tables used for the observational analysis in the main text.

3. tables_experimental.R: generates tables used for the experimental analysis in the main text.

4. tables_appendix.R: generates tables used in the appendix.